#include <iostream>
using namespace std;

int len = 20;
int num[20] = {6, 89, 124, 33, 1, 53, 552, 123, 45, 97, 22, 77, 999, 111, 82, 321, 333, 987, 321, 654};

void print_num() {
    for (int i = 0; i < 19; i++) {
        cout << num[i] << ", ";
    }
    cout << num[19] << endl;
}

void insertion() {  // 插入排序
    for (int i = 1; i < len; i++) {
        for (int j = 0; j < i; j++) {
            if (num[j] > num[i]) {
                int t = num[i];
                for (int k = i; k > j; k--) {
                    num[k] = num[k - 1];
                }
                num[j] = t;
                break;
            }
        }
    }

}

void choose() { // 选择排序
    for (int i = 0; i < len; i++) {
        int min_ind = i;
        for (int j = i + 1; j < len; j++) {
            if (num[j] < num[min_ind]) {
                min_ind = j;
            }
        }
        int t = num[i];
        num[i] = num[min_ind];
        num[min_ind] = t;
    }
}

void bubble() { // 冒泡排序
    for (int i = 0; i < len - 1; i++) {
        for (int j = len - 1; j > 0; j--) {
            if (num[j] < num[j - 1]) {
                int t = num[j];
                num[j] = num[j - 1];
                num[j - 1] = t;
            }
        }
    }
}



int main() {
    insertion();
    print_num();
}